<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<jsp:directive.page language="java"
	contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" />
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>用户信息编辑</title>
		<%@ include file="/commons/includes/head.jspf"%>
		<%@ include file="/commons/manage/content.jspf"%>
		<script type="text/javascript" src="userEdit.js"></script>
	</head>
	<body>
		<form name="userEdit" method="post" action="userEdit.shtml">
			<input type="hidden" id="event" name="event" value="save" />
			<c:if test="${form.user.type ne 'company'}">
				<input type="hidden" name="user.state"
					value="${form.user.state ==0? 1 : form.user.state}" />
			</c:if>
			<c:if test="${form.user.type eq 'company'}">
				<input type="hidden" name="ec_f_state" value="${form.user.state}" />
			</c:if>
			<input type="hidden" name="ec_f_type" value="${form.user.type}" />
			<div class="contBtnDiv">
				<span class="contBtn contBtnBack" id="btnBack">返 回</span>
				<span class="contBtn contBtnSave" id="btnSave">保 存</span>
				<c:if test="${not empty form.user.username}">
					<span class="contBtn contBtnNew" id="btnAdd">新 增</span>
					<span class="contBtn contBtnDel" id="btnDel">删 除</span>
					<c:if
						test="${(form.user.type eq 'company') and ((form.user.state==0) or (form.user.state==-1))}">
						<span class="contBtn contBtnPass" id="btnPass">审核通过</span>
					</c:if>
					<c:if
						test="${(form.user.type eq 'company') and (form.user.state==0)}">
						<span class="contBtn contBtnReject" id="btnReject">审核退回</span>
					</c:if>
				</c:if>
			</div>
			<div class="editDiv">
				<table id="userInfo" style="width: 100%;">
					<tr>
						<td class="label" width="120">
							<font color="red">*</font>&nbsp;用户名：
						</td>
						<td>
							<c:choose>
								<c:when test="${empty form.user.username}">
									<input type="text" id="username" name="username" title="用户名"
										style="width: 400px;" class="text required"
										value="${form.username}" />
								</c:when>
								<c:otherwise>
									<input type="text" class="text" name="user.username"
										readonly="readonly" style="width: 400px;"
										value="${form.user.username}" />
								</c:otherwise>
							</c:choose>
						</td>
					</tr>
					<tr>
						<td class="label">
							<label id="companyNameLabel" style="display: none">
								<font color="red">*</font>&nbsp;企业全称：
							</label>
							<label id="personNameLabel" style="display: none">
								<font color="red">*</font>&nbsp;姓名：
							</label>
						</td>
						<td>
							<input id="companyName" type="text" class="text required"
								style="display: none; width: 400px;" name="user.name"
								value="${form.user.name}" title="企业全称" />
							<input id="personName" type="text" class="text required"
								name="user.name" value="${form.user.name}"
								style="display: none; width: 400px;" disabled="disabled"
								title="姓名" />
						</td>
					</tr>
					<tr>
						<td class="label">
							<font color="red">*</font>&nbsp;密码：
						</td>
						<td>
							<input type="password" id="password" class="text" name="password"
								style="width: 400px;" value="" />
						</td>
					</tr>
					<tr>
						<td class="label">
							<font color="red">*</font>&nbsp;确认密码：
						</td>
						<td>
							<input type="password" id="confirmPassword" class="text"
								style="width: 400px;" name="confirmPassword" value="" />
						</td>
					</tr>
					<c:if test="${form.user.type eq 'company'}">
						<tr>
							<td class="label">
								账户状态：
							</td>
							<td>
								<input type="hidden" name="user.state"
									value="${form.user.state}" />
								<c:out value="${userStateRefer[form.user.stateStr]}"></c:out>
							</td>
						</tr>
					</c:if>
					<tr>
						<td class="label">
							用户类型：
						</td>
						<td>
							<c:out value="${userTypeRefer[form.user.type]}"></c:out>
							<input type="hidden" id="userType" name="user.type"
								value="${form.user.type}" />
						</td>
					</tr>
				</table>

				<table id="companyInfo" style="display: none; width: 100%">
					<tr>
						<td class="label" width="120">
							企业详细地址：
						</td>
						<td>
							<input type="text" class="text" name="company.address"
								style="width: 400px;" value="${form.company.address}" />
						</td>
					</tr>
					<tr>
						<td class="label">
							所属行业：
						</td>
						<td>
							<c:forEach var="key" items="${companyDomainReferList}"
								varStatus="status">
								<input id="ckCpDomain${status.index}" type="checkbox"
									name="company.domain" value="${key}"
									<c:if test="${fn:contains(form.company.domainSet, key)}"> checked="checked"</c:if> />
								<label for="ckCpDomain${status.index}">
									<c:out value="${companyDomainRefer[key]}" />
								</label>
							</c:forEach>
						</td>
					</tr>
					<tr>
						<td class="label">
							企业规模：
						</td>
						<td>
							<input id="cpSizeNull" type="radio" name="company.size"
								<c:if test="${empty form.company.size}">checked="checked"</c:if> />
							<label for="cpSizeNull">
								<c:out value="-" />
							</label>
							<c:forEach var="key" items="${companySizeReferList}"
								varStatus="status">
								<input id="cpSize${status.index}" type="radio"
									name="company.size" value="${key}"
									<c:if test="${form.company.size eq key}">checked="checked"</c:if> />
								<label for="cpSize${status.index}">
									<c:out value="${companySizeRefer[key]}" />
								</label>
							</c:forEach>
						</td>
					</tr>
					<tr>
						<td class="label">
							网络建设情况：
						</td>
						<td>
							<c:forEach var="key" items="${companyNetStatusReferList}"
								varStatus="status">
								<input id="ckCpNetsta${status.index}" type="checkbox"
									name="company.netStatus" value="${key}"
									<c:if test="${fn:contains(form.company.netStatusSet, key)}"> checked="checked"</c:if> />
								<label for="ckCpNetsta${status.index}">
									<c:out value="${companyNetStatusRefer[key]}" />
								</label>
							</c:forEach>
						</td>
					</tr>
					<tr>
						<td class="label">
							专有系统建设情况：
						</td>
						<td>
							<c:forEach var="key" items="${companySystemStatusReferList}"
								varStatus="status">
								<input id="ckCpSysSta${status.index}" type="checkbox"
									name="company.systemStatus" value="${key}"
									<c:if test="${fn:contains(form.company.systemStatusSet, key)}"> checked="checked"</c:if> />
								<label for="ckCpSysSta${status.index}">
									<c:out value="${companySystemStatusRefer[key]}" />
								</label>
							</c:forEach>
						</td>
					</tr>
					<tr>
						<td class="label">
							拥有自有IT队伍：
						</td>
						<td>
							<input id="itgSizeNull" type="radio" name="company.itGroupSize"
								<c:if test="${empty form.company.itGroupSize}">checked="checked"</c:if> />
							<label for="itgSizeNull">
								<c:out value="-" />
							</label>
							<c:forEach var="key" items="${companyItGroupSizeReferList}"
								varStatus="status">
								<input id="itgSize${status.index}" type="radio"
									name="company.itGroupSize" value="${key}"
									<c:if test="${form.company.itGroupSize eq key}">checked="checked"</c:if> />
								<label for="itgSize${status.index}">
									<c:out value="${companyItGroupSizeRefer[key]}" />
								</label>
							</c:forEach>
						</td>
					</tr>
				</table>
				<c:if test="${!isRegister}">
					<table id="expertInfo" align="center" width="100%"
						class="editBlock" style="display: none">
						<thead>
							<tr>
								<td colspan="2" align="center">
									专家用户信息
								</td>
							</tr>
						</thead>
						<tr>
							<td class="label">
								专家领域：
							</td>
							<td>
								<table>
									<tr>
										<td width="30%" align="center">
											一级领域
										</td>
										<td width="30%" align="center">
											一级领域
										</td>
										<td align="center">
											选中领域
										</td>
									</tr>
									<tr>
										<td width="30%">
											<select id="catalogList" multiple="multiple"
												style="width: 150px; height: 150px; border: 1px solid;">
												<c:forEach var="key" items="${expertDomainReferList}">
													<option value="${key}">
														<c:out value="${expertDomainRefer[key].title}" />
													</option>
												</c:forEach>
											</select>
										</td>
										<td width="30%">
											<select id="subCatalogList" multiple="multiple"
												style="width: 150px; height: 150px; border: 1px solid;">
												<option></option>
											</select>
										</td>
										<td>
											<select id="expertDomainList" multiple="multiple"
												style="width: 150px; height: 150px; border: 1px solid;">
												<c:forEach var="expDoamin" items="${form.expert.domainSet}">
													<option value="${expDoamin}">
														<c:out value="${allCatalogMap[expDoamin].title}" />
													</option>
												</c:forEach>
											</select>
										</td>
									</tr>
								</table>
							</td>
						</tr>
						<tr>
							<td class="label">
								专家介绍：
							</td>
							<td>
								<textarea rows="10"  name="user.comment"
									style="width: 680px;">${form.user.comment}</textarea>
							</td>
						</tr>
					</table>
					<div id="experDomainDiv">
					</div>
				</c:if>
			</div>
		</form>
	</body>
</html>